package com.hyts.mvc.base.handler;

import com.hyts.mvc.bean.web.MvcParamContext;
import com.hyts.mvc.config.HandlerType;
import com.hyts.mvc.config.RequestMethod;
import com.hyts.mvc.model.HandlerWrapper;
import org.apache.commons.chain.Context;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.mvc.base.handler
 * author:Libo/Alex
 * create-date:2019-07-08 13:47
 * email:liboware@gmail.com
 * description:此类主要用于:
 */
public abstract class WebMvcHandler implements Handler{


    private static final String DEFAULT_HTTP_REQUEST_METHOD = "POST";


    public boolean execute(Context context) throws Exception {
        if(context instanceof MvcParamContext){
            MvcParamContext context1 = (MvcParamContext)context;
            return !this.handle(context1.getHandlerWrapper());
        }
        return false;
    }
}
